<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    history
    <button>按钮</button>
    <a href="9.location对象.html">9</a>
    <script>
        // 页面的前进后退
        var btn= document.querySelector('button');
        btn.addEventListener('click',function(){
            // 1代表前进   -1 代表回退
            history.go(1);
        });
    </script>
</body>
</html>